public class Mystery1 {
    public static void main(String[] args) {
        mystery1(1);
        mystery1(6);
        mystery1(19);
        mystery1(39);
        mystery1(74);
    }

    public static void mystery1(int x) {
        int y = 1;
        int z = 0;
        while (2 * y <= x) {
            y *= 2;
            z++;
        }
        System.out.println(y + " " + z);
    }
}